import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'login',
      component: () => import('./views/login/login.vue')
    },
    {
      path: '/',
      redirect: '/material'
    },
    {
      path: '/material',
      component: () => import('./components/frame/frame.vue'),
      children: [
        // 素材管理
        {
          path: '/material',
          name: 'material',
          component: () => import('./views/material/material.vue')
        },
        // 用户管理
        {
          path: '/userInfo',
          name: 'userInfo',
          component: () => import('./views/userInfo/userInfo.vue')
        },
        // 系统设置
        {
          path: '/settings',
          name: 'settings',
          component: () => import('./views/settings/settings.vue')
        }
      ]
    }
  ]
})
